<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <!-- 输入框 -->
    <input type="text" v-model="inputTxt">
    {{inputTxt}}
    <!-- 单选 -->
    <hr>
    选择性别:
    <label for="male">男</label>
    <input type="radio" id="male" value="male" v-model="gender">
    <label for="female">女</label>
    <input type="radio" id="female" value="female" v-model="gender">
    <br>
    {{gender}}
    <hr>
    选择爱好：<br>
    <label for="lq">篮球</label>
    <input type="checkbox" id="lq" value="篮球" v-model="hobbies">
    <br>
    <label for="zq">足球</label>
    <input type="checkbox" id="zq" value="足球" v-model="hobbies">
    <br>
    <label for="pq">排球</label>
    <input type="checkbox" id="pq" value="排球" v-model="hobbies">
    <br>
    {{hobbies}}
    <hr>
    <!-- 复选框 绑定 checked属性，一般用于 某种协议，单独一个 -->
    <input type="checkbox" v-model="isChecked">
    {{ isChecked?'你已经同意协议':'请同意协议' }}
    <hr>

    选择城市：
    <select v-model="city">
      <option value="hefei">合肥</option>
      <option value="huainan">淮南</option>
      <option value="wuhu">芜湖</option>
      <option value="luan">六安</option>
    </select>
    {{city}}
  </div>
  <script src="./vue.global.js"></script>
  <script>
    const msg = '这是全局变量';
    const { createApp } = Vue;
    const app = createApp({
      data(){
        return {
          inputTxt: '你好vue',
          gender: 'male',
          hobbies: ['足球','篮球'],
          isChecked: true,
          city: 'wuhu'
        }
      }
    })
    app.mount('#app')

  
  </script>
</body>
</html>